﻿using System;
using System.Collections.Generic;
using System.Text;

using Microsoft.Scripting.Ast;
using Microsoft.Scripting;
using Microsoft.Linq.Expressions;

namespace DlrBasic.Parser.Ast
{
    class Beep : Statement
    {
        public Beep(SourceSpan span)
            : base(span)
        {
        }

        protected internal override Expression Generate(DlrBasicGenerator generator, StateMemberGenerator stateParameter, LambdaBuilder builder)
        {
            Expression cls = Utils.Call(typeof(DlrBasicHelpers).GetMethod("Beep"), SourceSpan);

            return Expression.Block(
                cls, base.Generate(generator, stateParameter, builder));
        }
    }
}
